Systems and computer-implemented models are used to help predict costs for groups of patients, or find interesting patterns among patients having some common attribute or attributes. Resulting data may then be used to make decisions, or for further analysis. For example, cost prediction data may be used to estimate healthcare-related costs for a group of patients. Existing risk adjustment systems assign risk factors to individual patients, based on that patient's drug history. For example, if a given patient is taking both barbiturates and insulin, risk factors associated with both barbiturates and insulin would likely be assigned to the patient. The risk factors assigned to the patient comprise the patient's risk factor profile, and the profile may then be used to predict costs, based on past cost data from patients with similar risk profiles.